package com.model;

import java.util.List;

/**
 * 学员信息类，继承用户类
 */
public class Student extends User{
    private static final long serialVersionUID = 6970127392612403306L;
    // 增加学号、年龄属性
    private String id;
    private int age;
    // 成绩
    private int score;
    // 是否参加了考试
    private boolean isExaming;
    // 试卷
    private List<Exam> exams;


    public Student() {
    }

    public Student(String id, String userName, int age, String passWord) {
        super(userName, passWord);
        this.id = id;
        this.age = age;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public boolean isExaming() {
        return isExaming;
    }

    public void setExaming(boolean examing) {
        isExaming = examing;
    }

    public List<Exam> getExams() {
        return exams;
    }

    public void setExams(List<Exam> exams) {
        this.exams = exams;
    }

    @Override
    public String toString() {
        return "Student{" + "id='" + id + "', userName=" + super.getUserName() + ", age=" + age + ", passWord=" + super.getPassWord() + "，socre=" + score +"}";
    }
}
